ArcPad Scripting Object Model
CenterAt and CenterAtXY Example
Send Feedback
ArcPad Scripting Object Model Reference > ArcPad Scripting Samples > CenterAt and CenterAtXY Example

Glossary Item Box

Description

Centers the map at the location clicked by the user.

VBScript Code

Copy Code
 Sub CenterMap
  Dim objPoint
  Set objPoint = Application.CreateAppObject("point")
  objPoint.X = Application.Map.PointerX
  objPoint.Y = Application.Map.PointerY
  Application.Map.CenterAt(objPoint)
  Set objPoint = Nothing
End Sub
Sub CenterMapXY
  Dim lngPointerX, lngPointerY
  lngPointerX = Application.Map.PointerX
  lngPointerY = Application.Map.PointerY
  Call Application.Map.CenterAtXY(lngPointerX,lngPointerY)
End Sub
©2012. All Rights Reserved.